<template>
  <default-layout>
    <header-back :text="title" slot="header"></header-back>
    <div slot="main" class="apply-success">
      <div class="top">
        <div class="icon icon-warning">
          <i class="xffont xf-shijian"></i>
        </div>
        <span class="title">待支付</span>
        <p>请尽快支付</p>
      </div>
      <div class="list">
        <mt-cell is-link to="javascript:;" @click.native="onSubmit">
          <span class="left-tip" slot="icon">您可以</span>
          <span class="list-content">发起支付</span>
        </mt-cell>
      </div>
    </div>
  </default-layout>
</template>
<script>
  import HeaderBack from '../../../components/header-back/header-back.vue'
  import DefaultLayout from '../../../layouts/default-layout/default-layout'
  import {mapGetters} from 'vuex'

  export default {
    components: {DefaultLayout, HeaderBack},
    name: 'transfer-waiting',
    data() {
      return {
        title: ''
      }
    },
    computed: {
      ...mapGetters([
        'order'
      ])
    },
    methods: {
      onSubmit() {
        this.$router.replace({
          name: 'payWay',
          query: this.$route.query
        })
      }
    },
    created() {
      if (!this.order) {
        this.$router.back()
        return
      }
      switch (this.$route.query.type) {
        case 'party':
          this.title = '党员缴费'
          break
        default:
          this.title = '继续教育缴费'
      }
    }
  }
</script>
<style lang="scss" scoped>
  @import "../../../common/style/variable";
</style>
